﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;


namespace ObjectModel.Excel
{
    public enum RangeChangedType { Deleted, Moved, ValueChanged}
    
    public class RangeChangedEventArgs : EventArgs
    {
        private bool mUndone = false;
        
        public RangeChangedType RangeChangedType { get; private set;}

        public bool Undone { get; private set; }

        public RangeChangedEventArgs(RangeChangedType type)
        {
            RangeChangedType = type;
        }

        public void Undo()
        {
            if (!Undone)
            {
                Globals.Application.Undo();
                Undone = true;
            }
        }
    }
}
